package com.jiyun.service;

import com.jiyun.dao.DeptMapper;
import com.jiyun.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptService {

    @Autowired(required = false)
    private DeptMapper mapper;

    public List<Dept> getAll(){
        return mapper.selectAll();
    }

    public Dept getDept(int id){
        return mapper.selectByPrimaryKey(id);
    }

}
